<div class="error">
    <?php echo validation_errors(); ?>
</div>

<?php echo form_open(base_url().'admin.php?c=question&m='.(isset($question)?'update':'add')); ?>
<?php echo isset($question)?form_hidden('id',$question->id):''; ?>

<div class="form_row">
    <label for="author">您的称呼</label>
    <input type="text" name="author" id="author" value="<?php echo isset($question)?$question->author:set_value('author') ?>" /> *
</div>

<div class="form_row">
    <label for="title">标题</label>
    <input type="text" name="title" id="title" value="<?php echo isset($question)?$question->title:set_value('title') ?>" /> *
</div>

<div>问题内容</div>
<div class="form_row">
    <textarea name="content" cols="50" rows="10"><?php echo isset($question)?$question->content:set_value('content'); ?></textarea>
</div>

<div class="form_btn">
    <input type="submit" name="submit" value="提交" />
</div>
<?php echo form_close(); ?>

<?php $this->load->view('richeditor'); ?>